package com.neu.service.klz;

import com.neu.dao.klz.EventDaoImpl;

import java.util.List;
import java.util.Map;

public class EventDaoService {
    private EventDaoImpl eventDao;
    public EventDaoService(){
        eventDao=new EventDaoImpl();
    }
    public List<Map<String,Object>>dofindByEname(){
        List<Map<String,Object>>list= null;
        try {
            list = eventDao.findByEname();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return list;
    }
    public boolean dosave(String e_name,String e_dis){
        boolean flag=false;
        try {
            int row=eventDao.save(e_name,e_dis);
            if (row>0){
                flag=true;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;
    }
}
